import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Index from '@/components/Index'
import Core from '@/components/Core'
import Exam from '@/components/exam/Exam'
import Ietm from '@/components/ietm/Ietm'
import Pms from '@/components/ietm/Pms'
import Content from '@/components/ietm/Content'
import Adapt from '@/components/ietm/Adapt'
import Media from '@/components/ietm/Media'
import Help from '@/components/ietm/Help'
import IetmLog from '@/components/ietm/IetmLog'
import Record from '@/components/ietm/Record'
import IetmNote from '@/components/ietm/record/IetmNote'
import IetmMarker from '@/components/ietm/record/IetmMarker'
import IetmMarkerEdit from '@/components/ietm/record/IetmMarkerEdit'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/exam',
      name: 'Exam',
      component: Exam
    },
    {
      path: '/ietm', // 培训系统第一页
      name: 'Ietm',
      component: Ietm
    },
    {
      path: '/pms', // 页面
      name: 'Pms',
      component: Pms
    },
    {
      path: '/content', // 内容
      name: 'Content',
      component: Content
    }, {
      path: '/adapt',
      name: 'Adapt',
      component: Adapt
    }, {
      path: '/media',
      name: 'Media',
      component: Media
    }, {
      path: '/help',
      name: 'Help',
      // redirect: '/help/index',
      component: Help
      /* children: [
        {
          path: 'index',
          name: 'ItemHelpIndex',
          component: ItemHelpIndex
        },
        {
          path: 'search',
          name: 'helpSearch',
          component: ItemHelpSearch
        }
      ] */
    }, {
      path: '/record',
      name: 'Record',
      redirect: '/record/note',
      component: Record,
      children: [
        {
          path: 'note',
          name: 'IetmNote',
          component: IetmNote
        },
        {
          path: 'marker',
          name: 'IetmMarker',
          component: IetmMarker
        },
        {
          path: 'markerEdit',
          name: 'IetmMarkerEdit',
          component: IetmMarkerEdit
        }

      ]
    },
    {  
      path: '/itemlog',
      name: 'IetmLog',
      component: IetmLog
    }

  ],
  linkActiveClass: 'active' // 该属性可以修改内置激活类
})
